# -*- coding:utf-8 -*-
# @Time:2024/4/1921:01
# @Author:miuzg
# @FileName:new test2.py
# @Software:PyCharm

import requests

url = "http://www.baidu.com/"

res = requests.get(url)
print(res)

res.encoding = 'utf-8'
html = res.text

with open('baidu.html','w',encoding='utf-8')as f:
    f.write(html)
    print('finish')

